package web.dang.zhou.service;

import java.util.List;

import web.dang.zhou.dao.DAOFactory;
import web.dang.zhou.model.Product;

public class ProductServiceImp implements ProductService {

	@Override
	public Product findById(int id) throws Exception {
		return DAOFactory.getProductDAO().findById(id);
	}
	
	@Override
	public List<Product> findByHot(int num) throws Exception {
		return DAOFactory.getProductDAO().findByHot(num);
	}
	
	@Override
	public List<Product> findByNew(int num) throws Exception {
		return DAOFactory.getProductDAO().findByNew(num);
	}
}
